/**
 * @Author: 张兴
 * @Date: 2019/6/20
 * @Last Modified by:   张兴
 * @Last Modified time: 2019-09-12 15:45:00
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 新增 未回收页
export const addDc = params => axios.post(`${SERVER.AUDI_CLAIM}/recycle/recycleBatter/insert`, params);
// 新增 已回收页
export const addAlreadyDc = params => axios.post(`${SERVER.AUDI_CLAIM}/recycle/recycleBatter/addAlreadyDc`, params);
// 删除
export const deleteDc = params => axios.put(`${SERVER.AUDI_CLAIM}/recycle/recycleBatter/deleteDc`, params);
// 退役index页面
export const retire = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/submitForSettlement/retire`, {params});
// 回收     改变单据状态为    batterStatus 98131002
// export const hs = params => axios.post(`${SERVER.AUDI_CLAIM}/recycle/recycleBatter/insert`, params);
 export const hs = params => axios.put(`${SERVER.AUDI_CLAIM}/recycle/recycleBatter/hs`, params);
// 修改
export const updateDc = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/submitForSettlement/updateDc`, {params});
// 退役
export const retairDc = params => axios.put(`${SERVER.AUDI_CLAIM}/recycle/recycleBatter/retairDc`, params);

// 查询 未回收界面
export const getRecovery = params => axios.get(`${SERVER.AUDI_CLAIM}/recycle/recycleBatter/getRecovery`, { params });
// 查询 已回收界面
export const getAlreadyRecovery = params => axios.get(`${SERVER.AUDI_CLAIM}/recycle/recycleBatter/getAlreadyRecovery`, { params });
// 查询 电池种类  表选
export const selectDCZL = params => axios.get(`${SERVER.AUDI_CLAIM}/recycle/recycleBatter/selectDCZL`, { params });
// 查询 电池编码  表选
export const selectDCBM = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/submitForSettlement/selectDCBM`, { params });

// 抽屉业  保存
export const saveOrUpdate = params => axios.put(`${SERVER.AUDI_CLAIM}/claim/claimOrder/saveOrUpdate`, params);

// 查询 已退役 新能源电池回收
export const getRetire = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/submitForSettlement/getRetire`, { params });

// 删除
export const deleteDialog = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/submitForSettlement/deleteDialog`, { params });
// 新增 未回退役
export const addTy = params => axios.post(`${SERVER.AUDI_CLAIM}/recycle/recycleBatter/addTy`, params);

export const enterprise = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/submitForSettlement/enterprise`, { params });

// 查询 已退役 新能源电池回收
export const getRetireWTY = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/submitForSettlement/getRetireWTY`, { params });
// 查询
export const queryById = params => axios.get(`${SERVER.BASEDATA}/code/queryById`, { params });
